<?php
namespace Tool\wx;
class Wx
{
    /**
     * 获取JSSDKscript
     */
    static function jsapi()
    {
        global $_W;
        $_script = "<script src='//res.wx.qq.com/open/js/jweixin-1.6.0.js'></script>";
        $_script .= "<script>
                wx.config({
                   debug:false,
                   appId:'".$_W['account']['jssdkconfig']['appId']."',
                   timestamp:'".$_W['account']['jssdkconfig']['timestamp']."',
                   nonceStr:'".$_W['account']['jssdkconfig']['nonceStr']."',
                   signature:'".$_W['account']['jssdkconfig']['signature']."',
                   jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','updateAppMessageShareData','updateTimelineShareData','chooseWXPay','hideMenuItems','getLocation','scanQRCode','hideAllNonBaseMenuItem','showMenuItems'],
                   openTagList: ['wx-open-subscribe']                   
                });
            </script>";
        return $_script;
    }
}